#ifndef BLE_SEND_TASK
#define BLE_SEND_TASK

#include <stdint.h>

typedef enum
{
	BLE_CMD_MIN = 0,
    BLE_RESTORE = 1,    //恢复出厂设置
	BLE_CONNECT = 2,    //设备入网
    BLE_CMD_MAX = 3,

} ble_send_base_function_e;

typedef enum
{
    BLE_SEND_POWER_OFF = 6,    //关电源
    BLE_SEND_POWER_ON  = 7,    //开电源
    BLE_SEND_RELAY_STATE = 8,  //获取继电器状态
    BLE_SEND_TIME      = 9,    //发送时间
    BLE_SEND_CONNECT_REPLAY = 10,    //从机连接回应
    BLE_SEND_TIMING_OFF,    //计时关任务
    BLE_SEND_TIMING_ON,    //计时开任务
    BLE_SEND_TIME_OFF,    //定时关任务
    BLE_SEND_TIME_ON,    //定时开任务

    BLE_SEND_GET_POWER,    //获取功率信息

} ble_send_user_cmd_e;

typedef enum
{
    NOT_CMD = 0,
    CMD_ING = 1,
    CMD_SUCCEED = 2,
    CMD_FAILED = 3,
    CMD_TIMEOUT,

}ble_cmd_state_e;

typedef struct
{
    uint8_t slave_id[2];
    uint8_t ble_send_cmd_time;
    uint8_t ble_send_cmd_connect_replay;
    uint8_t ble_send_cmd_num;
    uint8_t ble_send_user_cmd_state_last;
    uint8_t ble_send_user_cmd_state;   //蓝牙发送命令后的状态，正在执行命令，执行命令成功或者失败

    uint8_t ble_timing_data[7];
    uint8_t ble_time_data[7];
	
} ble_send_data_t;


void ble_send_task_init(void);


#endif